1. Field of the Invention
The present invention relates to a decoding apparatus and method for decoding compressed image data.
2. Related Background Art
Recently, there has been an increase in the number of applications for compressing static images as image data and for externally transmitting the compressed image data, or for storing it in a memory. For these purposes, it is preferable that lossless compression and encoding be used, especially when the data is for static images used for medical purposes, so that no deterioration of image quality occurs.
Accordingly, various efficient lossless compression and encoding methods have been proposed. For example, a lossless compression and encoding method has been proposed for outputting a difference between a pixel to be encoded and a predicted value generated by using peripheral pixels, and for performing Golomb-Rice coding for this difference.
With this method, when decoding is performed, the original value of the object pixel is reconstructed by adding the value of each difference to a predicted value that is generated based on the decoded values for peripheral pixels.
However, a specific apparatus configuration for decoding coded data has not yet been established.
To resolve this problem, it is one objective of the present invention to provide an arrangement for employing the above described peripheral pixels to perform fast decoding, and in particular to perform fast decoding while taking into account the timing whereat the values of peripheral pixels are obtained.
To achieve the above objective, according to the present invention a decoding apparatus, which decodes each pixel based on a plurality of peripheral pixels (corresponding to a, b, c and d in the preferred embodiments), comprises:
a plurality of memories (corresponding to memories 202 to 210), for storing a predetermined parameter (corresponding a k parameter or a parameter Cxcex1) necessary for decoding, which corresponds to a set of first and second statuses (corresponding to |Q3| and R3) that are obtained from a specific pixel (corresponding to pixel a);
a determination units (corresponding to a status generating unit 103 that generates |Q2|) for determining a read address in the plurality of memories based on a third status (corresponding to |Q2|) obtained from peripheral pixels (corresponding to b, c and d) other than the predetermined peripheral pixel; and
a selection unit (corresponding to memories 202 to 210 and a selector 211) for inputting the first and the second statuses obtained from the predetermined pixel and for selecting one of the plurality of memories in accordance with the inputted first and second statuses.